list_01 = [1, 2, 3, 4, 5, 6, 7]
list_02 = [i ** 2 for i in list_01]
print(list_02)
tuple_01 = (i ** 2 for i in list_01)
print(tuple_01)
print(tuple(tuple_01))


def hello():
    print("hello 1")
    yield 1
    print("hello 2")
    yield 2


res = hello()
# r = next(res)
# print(r)
# r = next(res)
# print(r)
print(list(res))


# def Fibonacci(num):
#     a, b, i = 0, 1, 0
#     while i < num:
#         print(b, end=" ")
#         a, b = b, a + b
#         i += 1
#
#
# Fibonacci(7)
def Fibonacci(num):
    a, b, i = 0, 1, 0
    while i < num:
        yield b
        a, b = b, a + b
        i += 1


res_01 = Fibonacci(7)
print(res_01)
print(list(res_01))
number_01 = int(input("Please input an integer:"))
for i in Fibonacci(number_01):
    print(i,end=" ")